﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.Windows.Data;

namespace Client
{
    public class MainWindowViewModel
    {
        public ICollectionView Users { get; private set; }

        public ICollectionView Customers { get; private set; }
       
        public MainWindowViewModel()

        {
         
            var _customers = new List<Customer>
                                 {
                                     new Customer
                                         {
                                             FirstName = "Christian",
                                             LastName = "Moser",
                                             Gender = Gender.Male,
                                             WebSite = new Uri("http://www.wpftutorial.net"),
                                             ReceiveNewsletter = true,
                                             Image = "Images/christian.jpg"
                                         },
                                     new Customer
                                         {
                                             FirstName = "Peter",
                                             LastName = "Meyer",
                                             Gender = Gender.Male,
                                             WebSite = new Uri("http://www.petermeyer.com"),
                                             Image = "Images/peter.jpg"
                                         }
                                 };

       
            var _users = new List<User>
                                 {
                                     new User
                                         {     
                                             firstname = "Christian",
                                             lastname = "Moser",
                                             username = "Christian",
                                             password = "Moser",
                                             email = "stuff@stuff.com",
                                             phone = "04548454"
                                            
                                         }                                   
                                };

            Users = CollectionViewSource.GetDefaultView(_users);
       
            Customers = CollectionViewSource.GetDefaultView(_customers);

                                  
        }
    }
}
